#include <iostream>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include "StdUdp.h"
#define port 8080
#define ip "192.168.204.128"


int main()
{
    StdUdpServer s(ip,port);
    while(1)
    {
        char msg[32] = {0};
        struct sockaddr_in clientAddr;
        socklen_t len = sizeof(clientAddr);
        if(s.UdpSRecv(msg,32) == false)
        {
            s.~StdUdpServer();
            return -1;
        }
        printf("接收到消息:%s\n",msg);
    }
    s.~StdUdpServer();

    return 0;
}